const AboutModel = require("./models/AboutModel");

/**
 * 获取数据
 * @returns 
 */
exports.getAboutDao = async () => {
    return await AboutModel.findAll();
}

/**
 * 设置about
 * @param {object} newAbout 
 * @returns 
 */
exports.setAboutDao = async (newAbout) => {
    await AboutModel.destroy({
        truncate: true
    })
    return await AboutModel.create(newAbout);
}